var saveType="";
function BroadbandMan(){
	this.loadData=function(){
		var formParams = $("#staticForm").serializeObject();		
		var	queryParam = formParams;
		invokeRemoteForPageQuery("broadbandMan_datagrid","broadbandManService","qryBroadbandManInfo",queryParam);
	}
	this.update=function(){
		saveOrUpdate="update";
		var selectRecord = $("#broadbandMan_datagrid").datagrid("getSelected");
		$('#viewForm').form('load',selectRecord);
		$("#viewWindow").window('open');
	}
	this.insert=function(){
		saveOrUpdate="insert";
		$('#viewForm').form('clear');
		$("#viewWindow").window('open');
	}
	
	this.updateDate=function(){
		var formData = $("#viewForm").serializeObject();	
		var param={
				serviceName:"broadbandManService",
				methodName: "update",
				needTrans:"Y",
				param: formData,
				handleFunc:function(resultObj){
					$.messager.alert("提示", '操作成功',"info");
					broadbandMan.closeWin('viewWindow');
					$("#broadbandMan_datagrid").datagrid("reload");
				}
		};
		invokeRemoteAsync(param);
		
	}
	this.inserDate=function(){
		var formData = $("#viewForm").serializeObject();	
		var param={
				serviceName:"broadbandManService",
				methodName: "insert",
				needTrans:"Y",
				param: formData,
				handleFunc:function(resultObj){
					$.messager.alert("提示", '操作成功',"info");
					broadbandMan.closeWin('viewWindow');
					$("#broadbandMan_datagrid").datagrid("reload");
				}
		};
		invokeRemoteAsync(param);
	}
	this.closeWin=function(winId){
		$("#" + winId).window('close'); 
	}
}
